package com.kvw.filesystem.core;

import com.kvw.filesystem.exception.FileSystemException;
import com.kvw.filesystem.model.FileObject;

import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Desc:
 *
 * @author: keen
 * Date: 2020-07-18
 * Time: 19:56
 */
public interface Storage {
    /**
     * 上传文件
     *
     * @param fileObject
     * @return
     */
    String upload(FileObject fileObject) throws FileSystemException;

    /**
     * 下载文件
     *
     * @param fileObject
     * @return
     */
    InputStream download(FileObject fileObject) throws FileSystemException;

    /**
     * 删除文件
     *
     * @param fileObject
     * @return
     */
    boolean delete(FileObject fileObject) throws FileSystemException;

}
